<div class="box">
	<div class="box-header well">
		<h2><i class="icon-info-sign"></i> 图片素材</h2>
	</div>
	<div class="box-content">
		<?php if (!empty($picMaterials)): ?>
			<ul class="thumbnails noMargin">
				<?php foreach ($picMaterials as $k => $pic):?>
					<li class="well noPadding span2 <?php echo $k%6 == 0 ? 'noMarginL' : ''; ?>">	<!-- top-block  -->
					  	<a href="<?php echo $picmaterial_url . $pic['orifileSrc']; ?>" class="cboxElement thumbnail noMarginB">
					  		<img class="wfullH100" src="<?php echo $picmaterial_url . $pic['thumbnailFileSrc']; ?>" />
					  	</a>
					</li>
				<?php endforeach;?>
				
				<li class="span4 text-center">
					<ul class="row-fluid noMarginL">
						<?php $albumCount = count($albums); ?>
						<li class="span4">
							<ul class="unstyled">
								<?php foreach(array_slice($albums, 0, $albumCount/3+1) as $album): ?>
									<li>
										<a href="<?php echo url('picmaterial/index', array('albumId' => $album['id'])); ?>"><?php echo $album['name']; ?></a>
									</li>
								<?php endforeach; ?>
							</ul>
						</li>
						<li class="span4">
							<ul class="unstyled">
								<?php foreach(array_slice($albums, $albumCount/3+1, $albumCount/3) as $album): ?>
									<li>
										<a href="<?php echo url('picmaterial/index', array('albumId' => $album['id'])); ?>"><?php echo $album['name']; ?></a>
									</li>
								<?php endforeach; ?>
							</ul>
						</li>
						<li class="span4">
							<ul class="unstyled">
								<?php foreach(array_slice($albums, $albumCount/3 * 2 + 1) as $album): ?>
									<li>
										<a href="<?php echo url('picmaterial/index', array('albumId' => $album['id'])); ?>"><?php echo $album['name']; ?></a>
									</li>
								<?php endforeach; ?>
							</ul>
						</li>
					</ul>
				</li>
			</ul>
		<?php else:?>
			<div class="alert alert-info">
				暂时没有数据
			</div>
		<?php endif;?>
	</div>
</div>